Option Explicit On 
Option Strict On

Public Class frmTaxSysClass
    Inherits System.Windows.Forms.Form
    Public Shared oCite As CiteInfo
    Public Shared bCiteLWC As Boolean
    Public Shared oCiteLWC As CiteInfo
    Public Shared sMods As String
    Friend WithEvents button_example As System.Windows.Forms.Button
    Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
    Public Shared bUpdate As Boolean

#Region " Windows Form Designer generated code "

    Public Sub New(ByVal cite1 As CiteInfo, ByVal bcite2 As Boolean, ByVal cite2 As CiteInfo, ByVal modifs As String)
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call
        oCite = cite1
        bCiteLWC = bcite2
        oCiteLWC = cite2
        sMods = modifs

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents txtCite As System.Windows.Forms.TextBox
    Friend WithEvents btnEdit As System.Windows.Forms.Button
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents txtMods As System.Windows.Forms.TextBox
    Friend WithEvents btnOK As System.Windows.Forms.Button
    Friend WithEvents btnCancel As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmTaxSysClass))
        Me.Label1 = New System.Windows.Forms.Label
        Me.txtCite = New System.Windows.Forms.TextBox
        Me.btnEdit = New System.Windows.Forms.Button
        Me.Label2 = New System.Windows.Forms.Label
        Me.txtMods = New System.Windows.Forms.TextBox
        Me.btnOK = New System.Windows.Forms.Button
        Me.btnCancel = New System.Windows.Forms.Button
        Me.button_example = New System.Windows.Forms.Button
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.SuspendLayout()
        '
        'Label1
        '
        Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.Label1.Location = New System.Drawing.Point(12, 9)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(192, 23)
        Me.Label1.TabIndex = 0
        Me.Label1.Text = "Classification System Citation"
        Me.ToolTip1.SetToolTip(Me.Label1, "Classification System Citation")
        '
        'txtCite
        '
        Me.txtCite.Location = New System.Drawing.Point(15, 35)
        Me.txtCite.Name = "txtCite"
        Me.txtCite.ReadOnly = True
        Me.txtCite.Size = New System.Drawing.Size(230, 20)
        Me.txtCite.TabIndex = 1
        Me.txtCite.TabStop = False
        Me.ToolTip1.SetToolTip(Me.txtCite, "Classification System Citation")
        '
        'btnEdit
        '
        Me.btnEdit.Image = Global.MetaDoc.My.Resources.Resources.file_edit_16x16
        Me.btnEdit.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnEdit.Location = New System.Drawing.Point(251, 33)
        Me.btnEdit.Name = "btnEdit"
        Me.btnEdit.Size = New System.Drawing.Size(75, 23)
        Me.btnEdit.TabIndex = 2
        Me.btnEdit.Text = "Edit"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(12, 70)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(200, 23)
        Me.Label2.TabIndex = 3
        Me.Label2.Text = "Classification System Modifications"
        Me.ToolTip1.SetToolTip(Me.Label2, "Classification System Modifications")
        '
        'txtMods
        '
        Me.txtMods.Location = New System.Drawing.Point(15, 87)
        Me.txtMods.Multiline = True
        Me.txtMods.Name = "txtMods"
        Me.txtMods.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        Me.txtMods.Size = New System.Drawing.Size(450, 75)
        Me.txtMods.TabIndex = 4
        Me.ToolTip1.SetToolTip(Me.txtMods, "Classification System Modifications")
        '
        'btnOK
        '
        Me.btnOK.Enabled = False
        Me.btnOK.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnOK.Image = Global.MetaDoc.My.Resources.Resources.Ok_16x16
        Me.btnOK.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnOK.Location = New System.Drawing.Point(309, 168)
        Me.btnOK.Name = "btnOK"
        Me.btnOK.Size = New System.Drawing.Size(75, 23)
        Me.btnOK.TabIndex = 5
        Me.btnOK.Text = "OK"
        Me.btnOK.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'btnCancel
        '
        Me.btnCancel.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.btnCancel.Image = Global.MetaDoc.My.Resources.Resources.Cancel_16x16
        Me.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.btnCancel.Location = New System.Drawing.Point(390, 168)
        Me.btnCancel.Name = "btnCancel"
        Me.btnCancel.Size = New System.Drawing.Size(75, 23)
        Me.btnCancel.TabIndex = 6
        Me.btnCancel.Text = "Cancel"
        Me.btnCancel.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        '
        'button_example
        '
        Me.button_example.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.button_example.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.button_example.Image = Global.MetaDoc.My.Resources.Resources.app_help_48x48
        Me.button_example.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
        Me.button_example.Location = New System.Drawing.Point(353, 12)
        Me.button_example.Name = "button_example"
        Me.button_example.Size = New System.Drawing.Size(110, 48)
        Me.button_example.TabIndex = 21
        Me.button_example.Text = "EXAMPLE"
        Me.button_example.TextAlign = System.Drawing.ContentAlignment.MiddleRight
        Me.button_example.UseVisualStyleBackColor = True
        '
        'ToolTip1
        '
        Me.ToolTip1.IsBalloon = True
        Me.ToolTip1.ShowAlways = True
        Me.ToolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info
        '
        'frmTaxSysClass
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(475, 199)
        Me.ControlBox = False
        Me.Controls.Add(Me.button_example)
        Me.Controls.Add(Me.btnCancel)
        Me.Controls.Add(Me.btnOK)
        Me.Controls.Add(Me.txtMods)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.btnEdit)
        Me.Controls.Add(Me.txtCite)
        Me.Controls.Add(Me.Label1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.Name = "frmTaxSysClass"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "Classification System"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region

    Private Sub frmTaxSysClass_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim sTemp As String = ""
        bUpdate = False
        sTemp = oCite.Author & ":  " & oCite.Title
        txtCite.Text = sTemp
        txtMods.Text = sMods
    End Sub

    Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click
        Dim sTemp As String = ""
        Dim iTimeVal As Integer = frmMetaMain.intTimeStyle
        Dim frmTaxCite As New frmCiteInfo(oCite, oCiteLWC, bCiteLWC, iTimeVal)
        frmTaxCite.ShowDialog()
        If (frmTaxCite.bUpdate = True) Then 'update the citation and text box
            oCite = frmTaxCite.newCite
            bCiteLWC = frmTaxCite.bLWC
            oCiteLWC = frmTaxCite.newLWC
            sTemp = oCite.Author & ":  " & oCite.Title
            txtCite.Text = sTemp
        End If
    End Sub

    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        sMods = txtMods.Text
        bUpdate = True
        Me.Dispose()
    End Sub

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        bUpdate = False
        Me.Dispose()
    End Sub

    Private Sub txtCite_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtCite.TextChanged
        If txtCite.Text.Trim() = ":" Then btnOK.Enabled = False Else btnOK.Enabled = True
    End Sub

    Public Function getUpdated() As Boolean
        Return bUpdate
    End Function
    Public Function getMods() As String
        Return sMods
    End Function
    Public Function getCite() As CiteInfo
        Return oCite
    End Function
    Public Function getbCiteLWC() As Boolean
        Return bCiteLWC
    End Function
    Public Function getCiteLWC() As CiteInfo
        Return oCiteLWC
    End Function

    Private Sub button_example_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button_example.Click
        Dim helpForm As dialog_help = New dialog_help("TaxSysClass")
        helpForm.ShowDialog()
    End Sub
End Class
